/*
This file is part of lAPIn.

lAPIn is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

lAPIn is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with lAPIn.  If not, see <http://www.gnu.org/licenses/>.
*/
package org.opensource.nabaztag;

/**
 * Encapsulates issues when interracting with a Nabaztag.
 */
public class RabbitException extends Exception {

    private final Message message;

    public RabbitException(final Message message, final String comment) {
        super(comment);
        this.message = message;
    }

    /**
     * Returns the message sent back by Nabaztag.
     *
     * @return Nabaztag message
     */
    public Message getNabaztagMessage() {
        return this.message;
    }

}
